package org.atovio.coolexam.service;

import org.atovio.coolexam.entity.Question;

import java.util.List;
import java.util.Map;

public interface QuestionService {

    /**
     * 根据条件查询记录条数
     *
     * @param criteria 条件
     * @return 记录条数
     */
    int getCount(Map<String, Object> criteria);

    Question add(Question question);

    List<Question> getAll();

    Question getById(int id);

    List<Question> getByQuestionTypeOnRandom(int questionType);

    List<Question> getSelective(Map<String , Object> criteria);

    void deleteById(int id);

}
